<template>
	<view  class="setting-parent-view">
		<view class="ab-item" style="margin-top: 20rpx;" @click="goGongGao">
			<text class="ab-text">公告</text>
			<image class="ab-arrow" src="../../static/right-arrow.png" mode="aspectFill"></image>
		</view>
		<text class="mune-item-line"/>
		<view class="ab-item" @click="goHelp">
			<text class="ab-text">帮助</text>
			<image class="ab-arrow" src="../../static/right-arrow.png" mode="aspectFill"></image>
		</view>
		<text class="mune-item-line"/>
		<view class="ab-item" @click="getAbout">
			<text class="ab-text">关于</text>
			<image class="ab-arrow" src="../../static/right-arrow.png" mode="aspectFill"></image>
		</view>
		<text class="mune-item-line"/>
		<view class="ab-item" @click="goSuggest">
			<text class="ab-text">我要提建议</text>
			<image class="ab-arrow" src="../../static/right-arrow.png" mode="aspectFill"></image>
		</view>
		<view class="outLogin" @click="shiqinLogin">
			切换登录
		</view>
		<text v-if="userPQD" class="mune-item-line"/>
		<view v-if="userPQD" class="outLogin" style="margin-top: 0rpx;background-color: rgba(0,0,0,0);color: #CCCCCC;" @click="unBinding">
			退出登录
		</view>
	</view>
</template>

<script>
	import request from '../index/request.js';
	export default {
		data() {
			return {
				userPQD:"",
			}
		},
		methods: {
			onShow: function(options) {
				var user = uni.getStorageSync("shiqin-user")
				this.userPQD=user.PQD
				this.share.url='/pages/tabBar/home/index?appInviteId='+this.appUtil.getAppInviteId()
				this.share.shareType=1
			},
			onLoad: function(options) {
				this.appUtil.saveAppInviteId(options)
			},
			goGongGao:function(){
				uni.navigateTo({
					url: "../information/index"
				})
			},
			goHelp:function(){
				uni.navigateTo({
					url: "../help/index"
				})
			},
			getAbout:function(){
				uni.navigateTo({
					url: "../about/index"
				})
			},
			shiqinLogin:function(){
				uni.navigateTo({
					url: "../shiqin-login/index"
				})
			},
			unBinding:function(){
				// var that=this
				// request.post("api/user/relieve_wxqq",{
				// 	platform:"wx",
				// }).then(data=>{
				// 	console.log(JSON.stringify(data))
				// })
				uni.setStorageSync("shiqin-user-xing","")
				uni.setStorageSync("shiqin-user-ming","")
				uni.setStorageSync("shiqin-user","")
				uni.setStorageSync("shiqin-user-sex","")
				uni.reLaunch({
					url:"/pages/tabBar/home/index"
				})
				
			},
			//建议
			goSuggest:function(){
				uni.navigateTo({
					url: '/pages/suggest/index'
				})
			}
		}
	}
</script>

<style>
	@import "index.css";
</style>
